package com.zbkj.service.settlement;

import com.zbkj.dal.entity.user.UserBrokerageRecord;

import java.util.List;

/**
 * @author tianzhonghai
 * 2023/10/6 15:52
 */
public abstract class AbstractSettleStrategy implements SettleStrategy {
    @Override
    public List<UserBrokerageRecord> execute(String orderNo) {
        List<UserBrokerageRecord> records = settle(orderNo);
//        save(records);

        return records;
    }

    public abstract List<UserBrokerageRecord> settle(String orderNo);

//    public void save(List<UserBrokerageRecord> records) {
//        if (CollectionUtils.isEmpty(records)) {
//            return;
//        }
//        UserBrokerageRecordService userBrokerageRecordService = SpringUtil.getBean(UserBrokerageRecordService.class);
//        userBrokerageRecordService.saveBatch(records);
//    }
}
